package easy;

public class Solution_1037 {
    public boolean isBoomerang(int[][] points) {
        if ((points[0][0] == points[1][0] && points[0][1] == points[1][1])
                || (points[1][0] == points[2][0] && points[1][1] == points[2][1])
                || (points[0][0] == points[2][0] && points[0][1] == points[2][1])) {
            return false;
        } else {
            int sub_y1 = points[2][1] - points[1][1];
            int sub_x1 = points[2][0] - points[1][0];

            int sub_y2 = points[1][1] - points[0][1];
            int sub_x2 = points[1][0] - points[0][0];
            if ((sub_y1 * sub_x2 == sub_x1 * sub_y2)) {
                return false;
            }
        }
        return true;
    }

    public static void main(String[] args) {
        Solution_1037 model = new Solution_1037();
        System.out.println(model.isBoomerang(new int[][]{{1, 1}, {2, 3}, {3, 2}}));
        System.out.println(model.isBoomerang(new int[][]{{1, 1}, {2, 2}, {3, 3}}));
        System.out.println(model.isBoomerang(new int[][]{{1, 1}, {1, 2}, {1, 3}}));
    }
}
